package com.hducms.cms.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.hducms.cms.dao.ContentTypeDao;
import com.hducms.cms.entity.main.ContentType;
import com.hducms.cms.service.ContentTypeService;

@Service
@Transactional
public class ContentTypeServiceImpl implements ContentTypeService {
	@Transactional(readOnly = true)
	public List<ContentType> getList(boolean containDisabled) {
		return dao.getList(containDisabled);
	}

//	@Transactional(readOnly = true)
//	public ContentType getDef() {
//		return dao.getDef();
//	}
//
	@Transactional(readOnly = true)
	public ContentType findById(Integer id) {
		ContentType entity = dao.findById(id);
		return entity;
	}
//
//	public ContentType save(ContentType bean) {
//		dao.save(bean);
//		return bean;
//	}
//
//	public ContentType update(ContentType bean) {
//		Updater<ContentType> updater = new Updater<ContentType>(bean);
//		ContentType entity = dao.updateByUpdater(updater);
//		return entity;
//	}
//
//	public ContentType deleteById(Integer id) {
//		ContentType bean = dao.deleteById(id);
//		return bean;
//	}
//
//	public ContentType[] deleteByIds(Integer[] ids) {
//		ContentType[] beans = new ContentType[ids.length];
//		for (int i = 0, len = ids.length; i < len; i++) {
//			beans[i] = deleteById(ids[i]);
//		}
//		return beans;
//	}

	private ContentTypeDao dao;

	@Autowired
	public void setDao(ContentTypeDao dao) {
		this.dao = dao;
	}
}